import request from '@/utils/request'
// ---------------- 管理员 ----------------
/*
  商户配置
*/
//获取商户配置信息
export function GetMerchantConfigInfo(data) {
  return request({
    url: '/adminapi/merchant/getMerchantConfig/info',
    method: 'post',
    data: data
  })
}
//更新商户配置信息
export function updateMerchantConfigInfo(data) {
  return request({
    url: '/adminapi/merchant/MerchantConfig/save',
    method: 'post',
    data: data
  })
}
//获取商户提现配置信息
export function GetMerchantWithdrawConfigInfo(data) {
  return request({
    url: '/adminapi/merchant/WithdrawConfig/info',
    method: 'post',
    data: data
  })
}
//更新商户提现配置信息
export function updateMerchantWithdrawConfigInfo(data) {
  return request({
    url: '/adminapi/merchant/WithdrawConfig/save',
    method: 'post',
    data: data
  })
}

/*
  商户行业配置
*/
//获取商户行业列表
export function getCateList(data) {
  return request({
    url: '/adminapi/merchant/cate/list',
    method: 'post',
    data: data
  })
}



/**
 * 列表
 * @param {array} params 请求参数
 */

// 获取商户列表
export function getMerchantList(data) {
  return request({
    url: '/adminapi/merchant/list',
    method: 'post',
    data: data
  })
}
// 添加商户列表
export function addMerchantList(data) {
  return request({
    url: '/adminapi/merchant/add',
    method: 'post',
    data: data
  })
}
// 修改商户列表
export function editMerchantList(data) {
  return request({
    url: '/adminapi/merchant/edit',
    method: 'post',
    data: data
  })
}
// 删除商户列表
export function delMerchantList(data) {
  return request({
    url: '/adminapi/merchant/destroy',
    method: 'post',
    data: data
  })
}


// 获取商户分类详情
export function getCatedDetail(data) {
  return request({
    url: '/adminapi/merchant/cate/detail',
    method: 'post',
    data: data
  })
}
// 添加商户分类列表
export function addCateList(data) {
  return request({
    url: '/adminapi/merchant/cate/add',
    method: 'post',
    data: data
  })
}
// 修改商户分类列表
export function editCateList(data) {
  return request({
    url: '/adminapi/merchant/cate/edit',
    method: 'post',
    data: data
  })
}
// 删除商户分类列表
export function delCateList(data) {
  return request({
    url: '/adminapi/merchant/cate/destroy',
    method: 'post',
    data: data
  })
}
// 查看商户
export function merchantDetail(data) {
  return request({
    url: '/adminapi/merchant/detail',
    method: 'post',
    data: data
  })
}
// 商户详情
export function detailNew(data) {
  return request({
    url: '/adminapi/merchant/detailNew',
    method: 'post',
    data: data
  })
}


// 商户申请管理
export function merchantApply(data) {
  return request({
    url: '/adminapi/merchant/apply',
    method: 'post',
    data: data
  })
}
// 商户审核
export function merchantAudit(data) {
  return request({
    url: '/adminapi/merchant/audit',
    method: 'post',
    data: data
  })
}
// 商户认证列表
export function authlst(data) {
  return request({
    url: '/adminapi/merchant/auth/list',
    method: 'post',
    data: data
  })
}
// 商户审核认证
export function authAudit(data) {
  return request({
    url: '/adminapi/merchant/auth/audit',
    method: 'post',
    data: data
  })
}

// 商户认证 开启/禁用
export function authStatus(data) {
  return request({
    url: '/adminapi/merchant/auth/status',
    method: 'post',
    data: data
  })
}

// 选品列表
export function merchantselectionlst(data) {
  return request({
    url: '/adminapi/merchant/selection/list',
    method: 'post',
    data: data
  })
}

// 选品上下架
export function selectionaudit(data) {
  return request({
    url: '/adminapi/merchant/selection/audit',
    method: 'post',
    data: data
  })
}
// 选品详情
export function selectiondetail(data) {
  return request({
    url: '/adminapi/merchant/selection/detail',
    method: 'post',
    data: data
  })
}
// 编辑选品
export function selectionedit(data) {
  return request({
    url: 'adminapi/merchant/selection/edit',
    method: 'post',
    data: data
  })
}

// 删除选品
export function selectiondestroy(data) {
  return request({
    url: '/adminapi/merchant/selection/destroy',
    method: 'post',
    data: data
  })
}

// 添加选品
export function selectionadd(data) {
  return request({
    url: '/adminapi/merchant/selection/add',
    method: 'post',
    data: data
  })
}

// 查看申请详情
export function getApplyDetail(data) {
  return request({
    url: '/adminapi/merchant/apply/detail',
    method: 'post',
    data: data
  })
}
// 修改商户状态
export function editMerchantStatus(data) {
  return request({
    url: '/adminapi/merchant/changeStatus',
    method: 'post',
    data: data
  })
}
// 添加选品
export function addselection(data) {
  return request({
    url: '/adminapi/merchant/selection/add',
    method: 'post',
    data: data
  })
}
// 编辑选品
export function editselection(data) {
  return request({
    url: '/adminapi/merchant/selection/edit',
    method: 'post',
    data: data
  })
}
// 获取选品详情
export function detailSelection(data) {
  return request({
    url: '/adminapi/merchant/selection/detail',
    method: 'post',
    data: data
  })
}
// 获取订单列表
export function getMerchantOrderList(data) {
  return request({
    url: '/adminapi/merchant/order/list',
    method: 'post',
    data: data
  })
}
// 查看订单详情
export function getMerchantOrderDetail(data) {
  return request({
    url: '/adminapi/merchant/order/detail',
    method: 'post',
    data: data
  })
}
// 上下架申请列表
export function getShelfList(data) {
  return request({
    url: '/adminapi/merchant/shelf/list',
    method: 'post',
    data: data
  })
}
// 上下架审核
export function editShelfapply(data) {
  return request({
    url: '/adminapi/merchant/shelf/apply',
    method: 'post',
    data: data
  })
}
// 查看上下架申请详情
export function getShelfDetail(data) {
  return request({
    url: '/adminapi/merchant/shelf/detail',
    method: 'post',
    data: data
  })
}
// 获取自提订单列表
export function getOrderSelfList(data) {
  return request({
    url: '/adminapi/merchant/order/selfList',
    method: 'post',
    data: data
  })
}
// 获取自提订单详情
export function getOrderSelfDetail(data) {
  return request({
    url: '/adminapi/merchant/order/selfDetail',
    method: 'post',
    data: data
  })
}
// 获取自提订单发货
export function orderSelfdelivery(data) {
  return request({
    url: '/adminapi/merchant/order/delivery',
    method: 'post',
    data: data
  })
}

// 商户自提订单导出
export function orderGetListExport(data) {
  return request({
    url: '/adminapi/merchant/order/getListExport',
    method: 'post',
    data: data
  })
}
// 订单发货
export function orderImport(data) {
  return request({
    url: '/adminapi/merchant/order/orderImport',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: data
  })
}

// 获取商户商品列表
export function getList(data) {
  return request({
    url: '/adminapi/merchant/goods/getList',
    method: 'post',
    data: data
  })
}
// 获取商户商品详情
export function getDetail(data) {
  return request({
    url: '/adminapi/merchant/goods/getDetail',
    method: 'post',
    data: data
  })
}
// 获取商户库存明细
export function inventoryRecord(data) {
  return request({
    url: '/adminapi/merchant/goods/inventoryRecord',
    method: 'post',
    data: data
  })
}
// 选品库存明细
export function merchantinventory(data) {
  return request({
    url: '/adminapi/merchant/selection/inventoryRecord',
    method: 'post',
    data: data
  })
}

